using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.Linq;
using System.Linq;

namespace GestionAlarmas.Client
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void ExecuteButton_Click(object sender, EventArgs e)
        {
            //TODO: Call proxy method
            string diasAlerta = "1100100";
            object[][] dias = new object[2][];
            dias[0] = new object[] { diasAlerta.ToCharArray() };
            dias[1] = new object[] { 0, 1, 2, 3, 4, 5, 6 };
            string[] resultado = (from d in dias[1] where ((char[])(dias[0][0]))[(int)d].Equals('1') select ((DayOfWeek)d).ToString()).ToArray();
            MessageBox.Show(resultado.Length.ToString());
        }
    }
}